<template>
  <div class="home">
    <router-view />
    <div class="bod">
      <van-tabbar route active-color="#ff690c">
        <van-tabbar-item replace to="/order" icon="home-o"
          >首页</van-tabbar-item
        >

        <van-tabbar-item replace to="/shopCar" icon="shopping-cart-o"
          >购物车</van-tabbar-item
        >
        <van-tabbar-item replace :to="user ? '/my' : '/login'" icon="manager-o"
          >我的</van-tabbar-item
        >
      </van-tabbar>
    </div>
    <i></i>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";

export default {
  name: "HomeView",
  components: {
    HelloWorld,
  },
  computed: {
    user() {
      return this.$store.state.user.email;
    },
  },
  data() {
    return {};
  },
};
</script>

<style lang='scss' scoped>
.home {
  i {
    display: block;
    height: 14vw;
    width: 100%;
  }
  .bod {
    border-top: 0.2667vw solid #ccc;
    position: fixed;
    bottom: 50px;
    width: 100%;
  }
}
</style>
